/*
 * @Description: 关于 about
 * @version: 
 * @Company: 
 * @Author: ZhengZhuang
 * @Date: 2019-08-31 10:13:57
 * @LastEditors: zhengzhuang
 * @LastEditTime: 2020-12-07 13:29:08
 */
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:C20Driver/routers/navigator_util.dart';
import 'package:C20Driver/utils/utils.dart';

class About extends StatefulWidget {
  @override
  _AboutState createState() => _AboutState();
}

class _AboutState extends State<About> {
  String versionNumber = '0.0.0';

  @override
  void initState() {
    super.initState();
    Utils.getVersionNumber().then((res) {
      setState(() {
        versionNumber = res;
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('关于'),
        elevation: 0,
      ),
      body: Container(
        color: Color(0xffffffff),
        alignment: Alignment.center,
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: <Widget>[
            Column(
              children: <Widget>[
                SizedBox(
                  height: ScreenUtil().setWidth(40.0),
                ),
                Image.asset(
                  'assets/icon/logoin.png',
                  width: ScreenUtil().setWidth(240.0),
                  height: ScreenUtil().setWidth(240.0),
                ),
                SizedBox(
                  height: ScreenUtil().setWidth(10.0),
                ),
                Text(
                  'C20出行司机端',
                  style: TextStyle(
                    fontSize: ScreenUtil().setSp(34.0),
                  ),
                ),
                SizedBox(
                  height: ScreenUtil().setWidth(10.0),
                ),
                Text(
                  'V$versionNumber',
                  style: TextStyle(
                    fontSize: ScreenUtil().setSp(30.0),
                  ),
                ),
                SizedBox(
                  height: ScreenUtil().setWidth(30.0),
                ),
                // InkWell(
                //   child: ArrowList(titleBox: '版本更新', contextDex: ''),
                //   onTap: () => AppUpdate().getAppUpdate(context),
                // ),
                // Divider(
                //   color: Colors.grey,
                //   height: 0,
                //   indent: ScreenUtil().setWidth(25.0),
                // ),
                // ArrowList(titleBox: '使用帮助', contextDex: ''),
                // Divider(
                //   color: Colors.grey,
                //   height: 0,
                //   indent: ScreenUtil().setWidth(25.0),
                // ),
                // ArrowList(titleBox: '功能介绍', contextDex: ''),
              ],
            ),
            Column(
              children: <Widget>[
                Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    InkWell(
                      child: Text("服务协议",
                          style: TextStyle(
                              decoration: TextDecoration.underline,
                              decorationStyle: TextDecorationStyle.solid,
                              fontSize: ScreenUtil().setSp(25.0),
                              color: Colors.blue)),
                      onTap: () => NavigatorUtil.jumpWebView(context,
                          'http://c20h5.huashichuxing.com/serviceAgreement'),
                    ),
                    SizedBox(width: ScreenUtil().setWidth(20.0)),
                    SizedBox(
                      width: ScreenUtil().setWidth(2.0),
                      height: ScreenUtil().setWidth(20.0),
                      child: DecoratedBox(
                        decoration: BoxDecoration(color: Colors.blue),
                      ),
                    ),
                    SizedBox(width: ScreenUtil().setWidth(20.0)),
                    InkWell(
                      child: Text("隐私政策",
                          style: TextStyle(
                              decoration: TextDecoration.underline,
                              decorationStyle: TextDecorationStyle.solid,
                              fontSize: ScreenUtil().setSp(25.0),
                              color: Colors.blue)),
                      onTap: () => NavigatorUtil.jumpWebView(context,
                          'http://c20h5.huashichuxing.com/yinsizhengce'),
                    ),
                  ],
                ),
                SizedBox(height: ScreenUtil().setWidth(20.0)),
                Text(
                  'C20出行天津华时科技有限公司 版权所有',
                  style: TextStyle(
                    fontSize: ScreenUtil().setSp(18.0),
                    color: Colors.black38,
                  ),
                ),
                Text(
                  'Copyright © 2019-2020MTSL',
                  style: TextStyle(
                    fontSize: ScreenUtil().setSp(18.0),
                    color: Colors.black38,
                  ),
                ),
                Text(
                  'All Rights Reserved',
                  style: TextStyle(
                    fontSize: ScreenUtil().setSp(18.0),
                    color: Colors.black38,
                  ),
                ),
                SizedBox(
                  height: ScreenUtil().setWidth(50.0),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
